package com.lucas.rpc.client;

import com.lucas.rpc.api.interfaces.HelloService;
import com.lucas.rpc.framework.entity.RpcServiceConfig;
import com.lucas.rpc.framework.proxy.RpcClientProxy;
import com.lucas.rpc.framework.transport.RpcTransport;
import com.lucas.rpc.framework.transport.socket.SocketRpcClient;

/**
 * @author: LiuCheng
 * @description:
 * @date: 2023-12-04 15:34
 **/
public class SocketClientMain {

    public static void main(String[] args) {

        RpcTransport rpcClient = new SocketRpcClient();
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();
        RpcClientProxy clientProxy = new RpcClientProxy(rpcClient,rpcServiceConfig);
        HelloService helloService = clientProxy.getProxy(HelloService.class);
        String result = helloService.hello("lucas");
        System.out.println(result);
    }
}
